gusucode.com > 支持向量机工具箱 - LIBSVM OSU_SVM LS_SVM源码程序 > 支持向量机工具箱 - LIBSVM OSU_SVM LS_SVM\stprtool\generalp\acov.m

    function [sigma]=acov(SIGMA,inx)
% ACOV returns covariance matrix of given index.
%   [sigma]=acov(SIGMA,inx)
%
% This function returns inx-th covarinace matrix.
% The matrix SIGMA contains a serie of L covariance matrices,
% i.e, SIGMA = [sigma_1, sigma_2, ..., sigma_L] where sigma_i
% is a matrix of size D-by-D.
%  
% Input:
%   SIGMA [D x L ] covariance matrices.
%   inx [1x1] index of given covarince matrix, inx must be 
%      from 1 to L.
%
% Output:
%   sigma [DxD] inx-thh covarince matrix.
%

% Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac
% (c) Czech Technical University Prague, http://cmp.felk.cvut.cz
% Modifications
% 9-june-2001, V.Franc.


dim = size(SIGMA,1);

sigma = SIGMA(:,1+dim*(inx-1):inx*dim);

return;